<?php
require_once ('controller/BaseController.class.php');
class ParticipanteController extends BaseController {
	public function listarGet() {
		$this->createModel ();
		$datos['mainView'] = $this->model->getParticipantesTodos ();
		$this->returnView($datos);
	}
	public function crearGet() {
		$this->returnView();
	}
	public function crearPost() {
		$this->createModel();
		$this->model->crearParticipante($_POST['nombre'],$_POST['edad'],$_POST['categoria']);
		$datos['mainView']['nombre']=$_POST['nombre'];
		$datos['mainView']['edad']=$_POST['edad'];		
		$this->returnView($datos);	
	}
}
?>